
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>StackingFault &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="GammaSurface" href="atomman.defect.GammaSurface.html" />
    <link rel="prev" title="FreeSurface" href="atomman.defect.FreeSurface.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.defect.GammaSurface.html" title="GammaSurface"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="atomman.defect.FreeSurface.html" title="FreeSurface"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="atomman.defect.html" accesskey="U">defect</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="stackingfault">
<h1>StackingFault<a class="headerlink" href="#stackingfault" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="atomman.defect.StackingFault">
<em class="property">class </em><code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">StackingFault</code><span class="sig-paren">(</span><em class="sig-param">hkl</em>, <em class="sig-param">ucell</em>, <em class="sig-param">cutboxvector='c'</em>, <em class="sig-param">maxindex=None</em>, <em class="sig-param">a1vect_uvw=None</em>, <em class="sig-param">a2vect_uvw=None</em>, <em class="sig-param">conventional_setting='p'</em>, <em class="sig-param">tol=1e-08</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.StackingFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">atomman.defect.FreeSurface.FreeSurface</span></code></p>
<p>Class for generating stacking fault atomic configurations.</p>
<dl class="method">
<dt id="atomman.defect.StackingFault.a1vect_cart">
<em class="property">property </em><code class="sig-name descname">a1vect_cart</code><a class="headerlink" href="#atomman.defect.StackingFault.a1vect_cart" title="Permalink to this definition">¶</a></dt>
<dd><p>One of the two shift vectors in Cartesian relative to system.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.a1vect_uvw">
<em class="property">property </em><code class="sig-name descname">a1vect_uvw</code><a class="headerlink" href="#atomman.defect.StackingFault.a1vect_uvw" title="Permalink to this definition">¶</a></dt>
<dd><p>One of the two conventional lattice shift vectors in Miller or Miller-Bravais indices.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.a2vect_cart">
<em class="property">property </em><code class="sig-name descname">a2vect_cart</code><a class="headerlink" href="#atomman.defect.StackingFault.a2vect_cart" title="Permalink to this definition">¶</a></dt>
<dd><p>One of the two shift vectors in Cartesian relative to system.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.a2vect_uvw">
<em class="property">property </em><code class="sig-name descname">a2vect_uvw</code><a class="headerlink" href="#atomman.defect.StackingFault.a2vect_uvw" title="Permalink to this definition">¶</a></dt>
<dd><p>One of the two conventional lattice shift vectors in Miller or Miller-Bravais indices.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.abovefault">
<em class="property">property </em><code class="sig-name descname">abovefault</code><a class="headerlink" href="#atomman.defect.StackingFault.abovefault" title="Permalink to this definition">¶</a></dt>
<dd><p>Indices of all atoms in system above the slip plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)">list</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.fault">
<code class="sig-name descname">fault</code><span class="sig-paren">(</span><em class="sig-param">a1=None</em>, <em class="sig-param">a2=None</em>, <em class="sig-param">outofplane=None</em>, <em class="sig-param">faultshift=None</em>, <em class="sig-param">minimum_r=None</em>, <em class="sig-param">a1vect_uvw=None</em>, <em class="sig-param">a2vect_uvw=None</em>, <em class="sig-param">faultpos_cart=None</em>, <em class="sig-param">faultpos_rel=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.StackingFault.fault" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a fault configuration by displacing all atoms above the slip
plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>a1</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The fractional coordinate of a1vect to shift by.
Default value is 0.0.</p></li>
<li><p><strong>a2</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The fractional coordinate of a2vect to shift by.
Default value is 0.0.</p></li>
<li><p><strong>outofplane</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – An out-of-plane shift, given in absolute units.
Default value is 0.0.</p></li>
<li><p><strong>faultshift</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The full shifting vector to displace the atoms above the slip
plane by.  Cannot be given with a1, a2, or outofplane.</p></li>
<li><p><strong>minimum_r</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Specifies the minimum allowed interatomic spacing across the slip
plane.  If any sets of atoms are closer than this value then the
outofplane shift is increased.  Default value is None, which
performs no adjustment.</p></li>
<li><p><strong>a1vect_uvw</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The crystal vector to use for one of the two shifting vectors.
Included here for those wishing to override the values set during
class initialization.</p></li>
<li><p><strong>a2vect_uvw</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The crystal vector to use for one of the two shifting vectors.
Included here for those wishing to override the values set during
class initialization.</p></li>
<li><p><strong>faultpos_rel</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The position to place the slip plane within the system given as a
relative coordinate along the out-of-plane direction.  Included
here for those wishing to override the value set when surface()
was called.  faultpos_rel and faultpos_cart cannot both be given.</p></li>
<li><p><strong>faultpos_cart</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The position to place the slip plane within the system given as a
Cartesian coordinate along the out-of-plane direction.  Included
here for those wishing to override the value set when surface()
was called.  faultpos_rel and faultpos_cart cannot both be given.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The atomic configuration with stacking fault shift</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.faultpos_cart">
<em class="property">property </em><code class="sig-name descname">faultpos_cart</code><a class="headerlink" href="#atomman.defect.StackingFault.faultpos_cart" title="Permalink to this definition">¶</a></dt>
<dd><p>The Cartesian position of the slip plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)">float</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.faultpos_rel">
<em class="property">property </em><code class="sig-name descname">faultpos_rel</code><a class="headerlink" href="#atomman.defect.StackingFault.faultpos_rel" title="Permalink to this definition">¶</a></dt>
<dd><p>The fractional position of the slip plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)">float</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.iterfaultmap">
<code class="sig-name descname">iterfaultmap</code><span class="sig-paren">(</span><em class="sig-param">num_a1=None</em>, <em class="sig-param">num_a2=None</em>, <em class="sig-param">outofplane=None</em>, <em class="sig-param">minimum_r=None</em>, <em class="sig-param">a1vect_uvw=None</em>, <em class="sig-param">a2vect_uvw=None</em>, <em class="sig-param">faultpos_cart=None</em>, <em class="sig-param">faultpos_rel=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.StackingFault.iterfaultmap" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterates over generalized stacking fault configurations associated
with a 2D map of equally spaced a1, a2 coordinates.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>num_a1</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a>) – The number of a1 values to generate systems for.
Default value is 1 (only generate for a1=0.0).</p></li>
<li><p><strong>num_a2</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a>) – The number of a2 values to generate systems for.
Default value is 1 (only generate for a2=0.0).</p></li>
<li><p><strong>outofplane</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – An out-of-plane shift, given in absolute units.
Default value is 0.0.</p></li>
<li><p><strong>minimum_r</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Specifies the minimum allowed interatomic spacing across the slip
plane.  If any sets of atoms are closer than this value then the
outofplane shift is increased.  Default value is None, which
performs no adjustment.</p></li>
<li><p><strong>a1vect_uvw</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The crystal vector to use for one of the two shifting vectors.
Included here for those wishing to override the values set during
class initialization.</p></li>
<li><p><strong>a2vect_uvw</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The crystal vector to use for one of the two shifting vectors.
Included here for those wishing to override the values set during
class initialization.</p></li>
<li><p><strong>faultpos_rel</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The position to place the slip plane within the system given as a
relative coordinate along the out-of-plane direction.  Included
here for those wishing to override the value set when surface()
was called.  faultpos_rel and faultpos_cart cannot both be given.</p></li>
<li><p><strong>faultpos_cart</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The position to place the slip plane within the system given as a
Cartesian coordinate along the out-of-plane direction.  Included
here for those wishing to override the value set when surface()
was called.  faultpos_rel and faultpos_cart cannot both be given.</p></li>
</ul>
</dd>
<dt class="field-even">Yields</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>a1</strong> (<em>float</em>) – The a1 fractional coordinate of a1vect.</p></li>
<li><p><strong>a2</strong> (<em>float</em>) – The a2 fractional coordinate of a2vect.</p></li>
<li><p><em>atomman.System</em> – The fault configuration associated with the a1, a2 shift.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.StackingFault.surface">
<code class="sig-name descname">surface</code><span class="sig-paren">(</span><em class="sig-param">shift=None</em>, <em class="sig-param">vacuumwidth=None</em>, <em class="sig-param">minwidth=None</em>, <em class="sig-param">sizemults=None</em>, <em class="sig-param">even=False</em>, <em class="sig-param">faultpos_rel=None</em>, <em class="sig-param">faultpos_cart=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.StackingFault.surface" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates the free surface atomic system, which is used as the basis for generating
the stacking fault configuration(s).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>shift</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Applies a shift to all atoms. Different values allow for free surfaces with
different termination planes to be selected.</p></li>
<li><p><strong>vacuumwidth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – If given, the free surface is created by modifying the system’s box to insert
a region of vacuum with this width. This is typically used for DFT calculations
where it is computationally preferable to insert a vacuum region and keep all
dimensions periodic.</p></li>
<li><p><strong>sizemults</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The three System.supersize multipliers [a_mult, b_mult, c_mult] to use on the
rotated cell to build the final system. Note that the cutboxvector sizemult
must be an integer and not a tuple.  Default value is [1, 1, 1].</p></li>
<li><p><strong>minwidth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – If given, the sizemult along the cutboxvector will be selected such that the
width of the resulting final system in that direction will be at least this
value. If both sizemults and minwidth are given, then the larger of the two
in the cutboxvector direction will be used.</p></li>
<li><p><strong>even</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – A True value means that the sizemult for cutboxvector will be made an even
number by adding 1 if it is odd.  Default value is False.</p></li>
<li><p><strong>faultpos_rel</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The position to place the slip plane within the system given as a
relative coordinate along the out-of-plane direction.  faultpos_rel
and faultpos_cart cannot both be given.  Default value is 0.5 if
faultpos_cart is also not given.</p></li>
<li><p><strong>faultpos_cart</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The position to place the slip plane within the system given as a
Cartesian coordinate along the out-of-plane direction.  faultpos_rel
and faultpos_cart cannot both be given.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="atomman.defect.FreeSurface.html"
                        title="previous chapter">FreeSurface</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="atomman.defect.GammaSurface.html"
                        title="next chapter">GammaSurface</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.defect.GammaSurface.html" title="GammaSurface"
             >next</a> |</li>
        <li class="right" >
          <a href="atomman.defect.FreeSurface.html" title="FreeSurface"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="atomman.defect.html" >defect</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>